Repository navigation
Add wind, falling tiles, lifts, and drawbridges - #21
Merged
Merged
Conversation
core/hazards.tcl gives each hazard as a function of the frame count, so a level plays the same each time. step rides a lift, adds the push of a gust, and hurts the hero under a falling tile. Levels 6 to 10 use them, with new routes from tools/solve.tcl.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5. Based on #20.
Four hazards of a hill town at night, in
core/hazards.tcl. Each one is a function of the frame count, so the same inputs give the same frames:{x0 x1 force period}: a gust for the first half of each period pushes the hero byforcepixels a frame between x0 and x1. Streaks show it.{x y0 period}: a shadow on the floor for 40 frames, then a tile falls at 4 pixels a frame to the top of the block under x. A tile that touches the hero hurts it, as the water does (eventtilehit).{x0 y0 x1 y1 period}: a floor on a rope that goes from y0 to y1 and back on a cosine. The hero on it rides it (h(lift)). The level check needs a period of at least 2 times the distance.{x0 y x1 period}: a floor that is down for the first half of each period and up for the second half.Levels 6 to 10 use them: a tile and a wind on Rooftops, a drawbridge on The Canal, a lift and a third lamp on Market Square, a wind on Old Wall, and a tile on Lantern Hill.
tools/solve.tclkeys a node with the frame count in a street with a moving part, and found a new route for each of the 5 levels. The levels of 0.1.0 have no hazard, and their routes replay as before. The push of a street with no wind is the integer 0, so the old frames stay the same bit for bit.What ran here:
ztcl test(105 tests pass, 13 new intests/hazards.test: each hazard, the errors of the level check, and a test that the same inputs give the same frames),tests/tk/smoke.tclandtests/tk/save.tclwith ztk 1.0.0-beta.8 headless, and captures of the hazards. What did not run: a person who plays the new hazards by hand, the web build with this change, and a phone.